#include "preprocess.h"

void Preprocess::process(const sensor_msgs::PointCloud2::ConstPtr &msg, PointCloudXYZI::Ptr &pcl_out){
  switch (time_unit)
  {
  case SEC:
    time_unit_scale = 1.e3f;
    break;
  case MS:
    time_unit_scale = 1.f;
    break;
  case US:
    time_unit_scale = 1.e-3f;
    break;
  case NS:
    time_unit_scale = 1.e-6f;
    break;
  default:
    time_unit_scale = 1.f;
    break;
  }
  
  switch (lidar_type)
  {
    case OUST64:
        oust64_handler(msg);
    break;

    case VELO16:
        velodyne_handler(msg);
    break;

    case RS32:
        rs_handler(msg);
    break;

    case NC_OUST64:
        newercollege_ouster_OS1_handler(msg);
    break;

    default:
        printf("Error LiDAR Type");
    break;
    *pcl_out = pl_full;
  }
}






void Preprocess::set(int lid_type, double bld, int pfilt_num){
    lidar_type = lid_type;
    blind = bld;
    point_filter_num = pfilt_num;
    
}


void Preprocess::rs_handler(const sensor_msgs::PointCloud2::ConstPtr &msg){

}


void Preprocess::oust64_handler(const sensor_msgs::PointCloud2::ConstPtr &msg){

}



void Preprocess::newercollege_ouster_OS1_handler(const sensor_msgs::PointCloud2::ConstPtr &msg){

}


void Preprocess::velodyne_handler(const sensor_msgs::PointCloud2::ConstPtr &msg){

}


